using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;

namespace Zeus.Domain.Model.Logistics.Map 
{
  public class TruckMap : ClassMap<Truck> 
    {
        public TruckMap() 
        {
			Table("truck");
			Id(x => x.Id).GeneratedBy.Identity().Column("id");
			Map(x => x.Name).Column("name");
			Map(x => x.Type).Column("type");
			Map(x => x.PlaceNumber).Column("place_number");
			HasOne(x => x.Driver).LazyLoad().Cascade.All();
            HasMany(x => x.Locations).LazyLoad().Inverse().Cascade.All();
        }
    }
}
